# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.FirebaseHosting.V1beta1.Model.Site do
  @moduledoc """
  A `Site` represents a Firebase Hosting site.

  ## Attributes

  *   `appId` (*type:* `String.t`, *default:* `nil`) - Optional. The [ID of a Web App](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.webApps#WebApp.FIELDS.app_id) associated with the Hosting site.
  *   `defaultUrl` (*type:* `String.t`, *default:* `nil`) - Output only. The default URL for the Hosting site.
  *   `labels` (*type:* `map()`, *default:* `nil`) - Optional. User-specified labels for the Hosting site.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. The fully-qualified resource name of the Hosting site, in the format: projects/PROJECT_IDENTIFIER/sites/SITE_ID PROJECT_IDENTIFIER: the Firebase project's [`ProjectNumber`](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects#FirebaseProject.FIELDS.project_number) ***(recommended)*** or its [`ProjectId`](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects#FirebaseProject.FIELDS.project_id). Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510).
  *   `type` (*type:* `String.t`, *default:* `nil`) - Output only. The type of Hosting site. Every Firebase project has a `DEFAULT_SITE`, which is created when Hosting is provisioned for the project. All additional sites are `USER_SITE`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :appId => String.t() | nil,
          :defaultUrl => String.t() | nil,
          :labels => map() | nil,
          :name => String.t() | nil,
          :type => String.t() | nil
        }

  field(:appId)
  field(:defaultUrl)
  field(:labels, type: :map)
  field(:name)
  field(:type)
end

defimpl Poison.Decoder, for: GoogleApi.FirebaseHosting.V1beta1.Model.Site do
  def decode(value, options) do
    GoogleApi.FirebaseHosting.V1beta1.Model.Site.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.FirebaseHosting.V1beta1.Model.Site do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
